<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<html>
	<head>
		<title>会员积分</title>
		<link href="${ctx}/css/safeai/together.css" rel="stylesheet" type="text/css">
		<%@ include file="/pages/safeai/jsp/common/meta.jsp"%>
	</head>

	<body>
		<form action="${ctx}/point.do?method=queryList" name="pointRecordForm" method="post">
			 <table width="100%" align="center">
			 	 <input type="hidden" name="point.customerId" value="${point.customerId}"/>
			 	 <tr>
		    		<th align="left" colspan="6" class="td_3" height="25px">${cusRealName}的积分
                    &nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;记录积分:${cusPoint}
                    &nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;滞留金:${cusCash}</th> 
		   		 </tr>
				 <tr>
		    		<th class="td_01">发生原因</th>
			    	<th class="td_01">发生日期</th>
			    	<th class="td_01">录入日期</th>
			    	<th class="td_01">积分增减</th>
			    	<th class="td_01">滞留金增减</th>
			    	
			    	<th class="td_01">操作</th> 
		   		 </tr>
				<logic:present name="ShoppingRecord">
					<logic:iterate id="pointRecord" name="ShoppingRecord" property="records">
						<tr>
							<td class="td_03">${pointRecord.content}</td>
							
							<bean:define id="shoppingDate" name="pointRecord" property="shoppingDate" />
							<bean:define id="addDate" name="pointRecord" property="addDate" />
							<td class="td_03"><%=com.safeai.util.Util.formatDate(new java.util.Date((Long)shoppingDate), "yy/MM/dd")%></td>
							<td class="td_03"><%=com.safeai.util.Util.formatDate(new java.util.Date((Long)addDate), "yy/MM/dd")%></td>
							
							<td class="td_03">${pointRecord.point}</td>
							<td class="td_03">${pointRecord.cash}</td>
							
							<td class="td_03">
								<a href="${ctx}/point.do?method=toUpdate&id=${pointRecord.id}">修改</a>
								<a href="#" onmousedown="if(confirm('是否删除？')==true) location.href='${ctx}/point.do?method=deletePointRecord&point.id=${pointRecord.id}&point.customerId=${pointRecord.customerId}'">删除</a>
							</td>
						</tr>
					</logic:iterate>
				</logic:present>
				<tr>
					<td colspan="6" align="right">
                    <div style="float:left">&nbsp;&nbsp;
                    	<a href="${ctx}/point.do?method=toAdd&uid=${point.customerId}">添加记录</a>
                    </div>
                    <%@ include file="/pages/safeai/jsp/common/page.jsp"%>&nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
				</tr>
			</table>
		</form>
	</body>
</html>
<script language="javascript">  
	function gotoPage(pageOffset, pageSize) {
			var form = document.getElementsByTagName("form")[0];
			form.elements["pager.offset"].value = pageOffset;
			form.elements["pageSize"].value = pageSize;
			form.submit();
	}
</script>